-- DEMUX

library ieee;
use ieee.std_logic_1164.all;

entity DEMUX is
	port(
	ENTRADA : in std_logic_vector(1 downto 0);
	S_HORA : out std_logic;
	S_MIN : out std_logic;
	S_SEG : out std_logic
	);
end DEMUX;

architecture DT_FLOW of DEMUX is
begin

	process(ENTRADA)
	begin
	
	if ENTRADA = "01" then
		S_HORA <= '1';
		S_MIN <= '0';
		S_SEG <= '0';
	elsif ENTRADA = "10" then
		S_HORA <= '0';
		S_MIN <= '1';
		S_SEG <= '0';
	elsif ENTRADA = "11" then
		S_HORA <= '0';
		S_MIN <= '0';
		S_SEG <= '1';
	else
		S_HORA <= '0';
		S_MIN <= '0';
		S_SEG <= '0';
	end if;
	
	end process;

end DT_FLOW;